#ifndef QUICK_LAUNCH_WIN_H_
#define QUICK_LAUNCH_WIN_H_

#include <string>

namespace quick_launch {

// Save link to disk.
bool SaveLink(HWND hwnd, LPCTSTR filepath, LPCTSTR exefile, 
              LPCTSTR iconfile, int iconindex, LPCTSTR params);

// Resolve a quick link and return it's parameters.
bool ResolveLink(HWND hwnd, LPCTSTR lpszLinkFile, 
                 std::string& path, std::string& params, 
                 std::string& iconfile, int& iconindex,
                 std::string& icondata, bool resolve_icon = true);

// Delete a local quick launch from disk.
bool DeleteQuickLaunch(HWND hwnd, const char* path);
bool DeleteQuickLaunch(HWND hwnd, TCHAR* path);
bool DeleteQuickLaunch(TCHAR* path);

// Get local path
char* GetLocalPath(HWND hwnd, const char* title, const char* inital_path);

// Select a local quick launch file, and return the full path file name.
bool SelectQuickLaunch(HWND hwnd, TCHAR* quick_launch, int size);

// Startup a quick launch.
bool Startup(HWND hwnd, const char* filename);

// Valid a local path.
bool ValidPath(const char* path);
bool ValidPath(TCHAR* path);

// Get desktop folder of current user.
char* GetDesktopFolder(HWND hwnd);

// Get quick launch folder of current user.
char* GetQuickLaunchFolder(HWND hwnd);

// Get default user data path.
char* GetDefaultDataPath(TCHAR* exefile = NULL);

// Get our specified user-data-dir
char* GetUserDataFolder();

// Create folder
bool CreateFolder(TCHAR* path, int size);

// Copy folder
bool CopyFolder(TCHAR* source, TCHAR* dest);

// Get system icons path.
TCHAR* GetSystemIconsPath(HWND hwnd, TCHAR* path);

// Get user defined icons path.
TCHAR* GetUserDefinedIconsPath(HWND hwnd, TCHAR* path);

// Get icon data from file.
void GetIconData(TCHAR* iconfile, int index, std::string& icondata);

// Convert image file to ico file.
bool ConvertImageToIcon(TCHAR* imagefile, TCHAR* iconfile);

// Resolve user data dir from parameters.
TCHAR* ResolveUserDataDir(const std::string& params, TCHAR* userdatadir);
WCHAR* ResolveUserDataDir(const std::wstring& params, WCHAR* userdatadir);

enum WinVersion {
  WINVERSION_PRE_2000 = 0,  // Not supported
  WINVERSION_2000 = 1,      // Not supported
  WINVERSION_XP = 2,
  WINVERSION_SERVER_2003 = 3,
  WINVERSION_VISTA = 4,
  WINVERSION_2008 = 5,
  WINVERSION_WIN7 = 6,
};

WinVersion GetWinVersion();

}

#endif